package model;

public class Teacher {
    private String teacherId;
    private String teacherName;
    private String gender; // 新增：性别
    private String college; // 新增：所属学院
    private Course course;

    // 修改：构造方法新增 gender、college 参数
    public Teacher(String teacherId, String teacherName, String gender, String college, String time) {
        this.teacherId = teacherId;
        this.teacherName = teacherName;
        this.gender = gender; // 新增：初始化性别
        this.college = college; // 新增：初始化学院
    }

    // 修改：openCourse 方法新增教师性别和学院信息
    public void openCourse(Course course) {
        this.course = course;
        System.out.println(teacherName + "（" + gender + "，" + college + "学院）开设了课程：" + course.getCourseName());
    }

    // 新增：gender 和 college 的 Getter/Setter
    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getCollege() {
        return college;
    }

    public void setCollege(String college) {
        this.college = college;
    }

    // 其他原有属性的 Getter/Setter 不变（省略）
}